
#ifndef ITCPClient_h__
#define ITCPClient_h__
#include "StdCmm.h"

class IPacketCodec;
class ITCPClient
{
public:
	virtual ~ITCPClient(){}

public:
	virtual CONNECT_STATUS Connect(SocketID id, std::string ip, unsigned short port,
								  IPacketCodec *pCodec,
								  const MessageHandler & handler) = 0;

	virtual void Close(SocketID id) = 0;

	virtual SendResult AsyncSend(SocketID id, const char *pBuffer, int size) = 0;
	virtual SendResult SyncSend(SocketID id, const char *pBuffer, int size) = 0;
};

#endif // ITCPClient_h__

